﻿using Basic.HrRemoteModel.EmpFile;
using Basic.HrRemoteModel.EmpFile.Model;
using Basic.HrService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.HrService.RpcEvent
{
    internal class EmpSelfFileEvent : IRpcApiService
    {
        private readonly IEmpSelfFileService _Service;

        public EmpSelfFileEvent ( IEmpSelfFileService service )
        {
            this._Service = service;
        }

        public long AddEmpFile ( AddEmpFile add )
        {
            return this._Service.Add(add.Datum);
        }

        public void DeleteEmpFile ( DeleteEmpFile obj )
        {
            this._Service.Delete(obj.Id);
        }
        public EmpFileDto FindLastEmpFile ( FindLastEmpFile obj )
        {
            return this._Service.FindLast(obj.EmpId, obj.Classtify);
        }
        public EmpFileDto[] GetEmpFiles ( GetEmpFiles obj )
        {
            return this._Service.Gets(obj.EmpId, obj.Classify);
        }
    }
}
